<template>
  <div>
    <div id="orderList" :class="fun.getPhoneEnv() == 3 ? 'pcStyle' : ''">
      <van-checkbox-group v-model="checkList" @change="multiplePayChange" ref="checkboxGroup">
        <div v-for="(order, index) in datasource"
          :class="orderType == 'lease_toy' && index == datasource.length - 1 ? 'Margintop shop' : 'shop'" :key="index">
          <div class="title">
            <van-checkbox checked-color="#f15353" :name="order.id"
              v-if="status == 1 && consolidated && orderType != 'customized-group' && orderType != 'travelAround' && orderType != 'store-projects'">&nbsp;</van-checkbox>
            <div class="title-detail">
              <template v-if="orderType == 'local-life'">
                <div class="flex-a-c" @click="goto_store(order.has_many_order_goods[0].goods_id)">
                  <i class="iconfont icon-info_store"></i>
                  <div class="fw-500 fz-30 flex-a-c">{{order.shop_name}}<template v-if="order.available_store>1">等{{ order.available_store }}店通用</template><i class="iconfont icon-icon_more11"></i></div>
                </div>
              </template>
              <template v-else>
                <div class="tags" v-if="order.dispatch_type_name">{{ order.dispatch_type_name }}</div>
                <div class="order-shop-name" @click="toStore(order)"
                  v-if="order.shop_name && (order.plugin_id == 0 || order.plugin_id == 92 || order.plugin_id == 31 || order.plugin_id == 32 || order.plugin_id == 44 || order.plugin_id == 54 || order.plugin_id == 108)">
                  <div class="shop-name">{{ order.shop_name }}</div>
                  <i class="iconfont icon-advertise-next"></i>
                </div>
                <div v-else  class="order-number" style="margin-top:0">{{ $i18n.t('base.orderNumber') }}：{{ order.order_sn }}</div>
              </template>
            </div>

            <div class="span" v-if="orderType != 'stock'">
              <span v-if="order.is_pending == 1">{{ order.status_name.slice(0, -4) }}</span>
              <span v-else>{{ order.status_name }}</span>
              <span style="font-size:12px;margin-top:-4px;" v-if="order.is_pending == 1">(锁定)</span>
            </div>
          </div>
          <div class="order-number"  v-if="order.shop_name && (order.plugin_id == 0 || order.plugin_id == 92 || order.plugin_id == 31 || order.plugin_id == 32 || order.plugin_id == 44 || order.plugin_id == 54 || order.plugin_id == 108)">{{ $i18n.t('base.orderNumber') }}：{{ order.order_sn }}</div>

          <!-- 周边游 plugin_id-154 -->
          <div v-if="order.plugin_id === 154">
            <div @click="toOrderDetail(order)" v-for="(goods, i) in order.has_many_travel_around_order_goods" :key="i">
              <div class="goods-box">
                <div class="img"><img :src="goods.option_img" referrerPolicy="no-referrer"/></div>
                <div class="goods-box-bottom">
                  <div>
                    <div class="warp">
                      <div class="name">{{  goods.title }}</div>
                      <div class="num">×{{ goods.total }}</div>
                    </div>
                    <div v-if="goods.option_title" class="option">{{ $i18n.t('base.specification') }}: {{ goods.option_title }}</div>
                    <div class="reserveClass" v-if="order.store_reserve">预约日期：{{ order.store_reserve }}</div>
                  </div>
                  <div class="price">
                    <div class="money">
                      <div class="text-left fz-28 bold">
                        <div>{{ $i18n.t("money") }}{{ goods.goods_price }}</div>
                      </div>
                      <template v-if="goods.after_sales && goods.after_sales.refunded_total > 0">
                        <div class="deposit-tips" v-if="goods.after_sales.refund_id != 0"
                          @click.stop="toUrl('aftersales', { refund_id: order.refund_id }, { pluginid: order.plugin_id })">
                          <span>{{goods.after_sales.refund_type_name }}:{{ goods.after_sales.refund_status_name }} x {{ goods.after_sales.refunded_total }}</span>
                          </div>
                        <div class="deposit-tips" v-if="goods.after_sales.refund_id == 0"
                          @click.stop="toUrl('aftersaleslist', {}, { order_goods_id: goods.id })">
                          <span>已退款 x {{ goods.after_sales.refunded_total }}</span>
                        </div>
                      </template>
                    </div>
                  </div>
                </div>

              </div>
              <div class="comment-box" v-if="goods.buttons && goods.buttons.length > 0">
                <div v-for="(btn, index) in goods.buttons" :key="index" class="comment-btn"
                  :class="{ 'color-btn': btn.value == 2  }" @click.stop="evaluateOpration(btn, goods, order)">
                  {{ btn.name }}
                </div>
              </div>
            </div>
          </div>
          <div v-else>
            <div @click="toOrderDetail(order)" v-for="(goods, i) in order.has_many_order_goods" :key="i">
              <div class="goods-box">
                <div class="img"><img :src="goods.thumb" referrerPolicy="no-referrer"/></div>
                <div class="goods-box-bottom">
                  <div>
                    <div class="warp">
                      <div class="name" v-if="!order.deposit_ladder" style="-webkit-box-orient: vertical;">{{ goods.title
                        | escapeTitle }}</div>
                      <div class="name" v-if="order.deposit_ladder" style="-webkit-box-orient: vertical;">
                        <!--判断定金活动尾款-->{{ order.deposit_ladder.activity_name | escapeTitle }}
                      </div>
                      <div class="num" v-if="detailUrl != 'HotelOrderDetail'">×{{ goods.total }}</div>
                    </div>
                    <div class="option" v-if="goods.goods_option_title || detailUrl == 'HotelOrderDetail'">
                      <div v-if="goods.goods_option_title" style="margin-right: 5px;">{{ $i18n.t('base.specification') }}: {{ goods.goods_option_title }}
                      </div>
                      <div class="num" v-if="detailUrl == 'HotelOrderDetail'">{{ getDays(order.hotel_order.enter_at,
                        order.hotel_order.leave_at) }}晚{{ goods.total }}间</div>
                    </div>
                    <div class="reserveClass" v-if="order.store_reserve">预约日期：{{ order.store_reserve }}</div>
                    <div class="show_time_word_txt" v-if="goods.show_time_word">{{ goods.show_time_word }}</div>
                  </div>
                  <div class="price">
                    <div class="money">
                      <!-- 租赁、社区团购  -->
                      <div class="lease-box" v-if="order.plugin_id == 40 || order.plugin_id == 164 ? true : false">
                        租赁到期日期:{{formatTime(order)}}
                      </div>
                      <div class="text-left fz-28 bold">
                        <!--判断定金活动-->
                        <span class="deposit-tips-1"  v-if="order.plugin_id == 108">定金</span>
                        <!--判断定金活动尾款-->
                        <span class="deposit-tips-1" v-if="order.deposit_ladder">尾款</span>
                        <template  v-if="order.plugin_id == 40 ? true : false">
                          {{ $i18n.t("money") }}{{ orderType == "lease_toy" ? goods.price / order.has_one_lease_toy_order.return_days / goods.total
                        : orderType == "groups" ? order.price : goods[isOrder ? "payment_amount" : "price"] }}/天
                        </template>
                        <template v-else>
                          {{ $i18n.t("money") }}{{ orderType == "lease_toy" ? goods.price / order.has_one_lease_toy_order.return_days / goods.total
                        : orderType == "groups" ? order.price : goods[isOrder ? "payment_amount" : "price"] }}
                        </template>
                      </div>
                      <div v-if="vip_show && Number(goods.vip_price) > 0" class="vipPirce ">
                        会员价:&nbsp;{{ $i18n.t("money") }}{{ goods.vip_price }}
                      </div>
                      <template v-if="goods.after_sales && goods.after_sales.refunded_total > 0">
                        <div class="deposit-tips" v-if="goods.after_sales.refund_id != 0"
                          @click.stop="toUrl('aftersales', { refund_id: order.refund_id }, { pluginid: order.plugin_id })">
                          <span>{{goods.after_sales.refund_type_name }}:{{ goods.after_sales.refund_status_name }}
                          x {{ goods.after_sales.refunded_total }}</span>
                        </div>
                        <div class="deposit-tips" v-if="goods.after_sales.refund_id == 0"
                          @click.stop="toUrl('aftersaleslist', {}, { order_goods_id: goods.id })">
                          <span>已退款 x {{ goods.after_sales.refunded_total }}</span>
                        </div>
                      </template>
                    </div>
                  </div>
                </div>
              </div>
              <div class="comment-box" v-if="goods.buttons && goods.buttons.length > 0">
                <div v-for="(btn, index) in goods.buttons" :key="index" class="comment-btn"
                  :class="{ 'color-btn': btn.value == 2  || btn.value==0}" @click.stop="evaluateOpration(btn, goods, order)">
                  {{ btn.name }}
                </div>
              </div>
            </div>
          </div>

          <div class="cloud_reward" v-if="order.cloud_shop_reward_amount && cloud_check(1)">{{ self_reward_name }}{{ $i18n.t("money") }}{{ order.cloud_shop_reward_amount }}</div>
          <div :class="{'address-box':order.plugin_id!==130}" v-if="order.address && order.address.address && cloud_check(0)">
            <!-- 分时预约 -->
            <template v-if="order.plugin_id == 130&&order.reserve_simple">
              <p class="time-share-top">{{ order.reserve_simple.customer_name  }} {{order.reserve_simple.customer_tel}}</p>
              <p class="time-share-bottom">预约时间：{{order.reserve_simple.begin_time||''}}</p>
            </template>
            <template v-else>
              <p v-if="order.ecpay_logistics">
                {{  order.ecpay_logistics.number }} {{  order.ecpay_logistics.name }}
              </p>
              <p>
                {{ order.address.realname }} <template v-if="order.address.mobile">&nbsp;{{ order.address.mobile }}</template>
              </p>
              <p>{{ order.address.address }}</p>
            </template>
          </div>
          <div class="group-banquet" v-if="order.other_order_data">
            <p v-for="(_other, _othderIndex) in order.other_order_data" :key="_othderIndex">{{ _other.name }}</p>
          </div>

          <!-- 咖啡机 -->
          <div class="coffee_expire_time" v-if="order.coffee_machine_expire_time">兑领期限：{{ order.coffee_machine_expire_time }}</div>
          <!-- 存货订单-存货时间 -->
          <div class="allbtStockTime"  v-if="orderType == 'stock'">存货时间:&nbsp;{{ order.inventory_time }}</div>

          <div class="title-pay" v-if="order.plugin_id === 154">
              共 {{ order.goods_total }}
              {{ detailUrl == "HotelOrderDetail" ? "个房间" : "件商品" }}
              {{ $i18n.t('base.actualPayment') }}：<span class="f-15" style="font-weight: bold;">{{ $i18n.t("money") }}{{ order && order.travel_around_order && order.travel_around_order.order_price }}</span>
          </div>
          <div class="title-pay" v-else>
              <template v-if="order.goods_total">共 {{ order.goods_total }} {{ detailUrl == "HotelOrderDetail" ? "个房间" : "件商品" }}</template>
              {{ $i18n.t('base.actualPayment') }}：<span class="f-15" style="font-weight: bold;">{{ $i18n.t("money") }}{{ order.price }}</span>
          </div>
          <!-- 存货订单-存货按钮 -->
          <div class="allbtStock">
            <div class="rightAll">
              <template v-for="(item, i) in order.button_models">
                <span :key="i" v-if="item.value == 'inventory_cancel'" @click="operation(item, order, order.barter)"
                  :class="[!item.api ? 'noClickBG' : '', item.value == 1 ? 'red-button' : '']">{{item.name}}</span>
              </template>
            </div>
          </div>
           <!--卡券信息不能再更多里显示  前端判断 卡券类型为2  待收货 和已完成才显示-->
          <div class="allbt" :class="{'row-reverse': order.has_one_pay_type && order.has_one_pay_type.code=='unPay' }"
            v-if="(order.button_models.length > 0 || Object.values(order.button_models).length > 0) && orderType != 'stock'">
            <span class="red-button"
              v-if="(order.status == 2 || order.status == 3) && order.camilo_resources_coupon_type == 2"
              @click.stop="operation({ value: 140, api: '1' }, order)">卡券信息</span>
            <template v-for="(item, i) in order.button_models">
              <span :key="i" v-if="i < 3" @click="operation(item, order, order.barter)"
                :class="[!item.api && item.value != '41' ? 'noClickBG' : '', (item.value == 1||item.value == 'local-life') ? 'red-button' : '']">{{
                  item.name }}</span>
              <div :key="i" v-if="i == 3 && order.button_models.length > 3" class="more-button-1"
                @click.stop="showMore(order.order_sn)">更多</div>
              <div class="more-button" :key="i"
                v-if="i == 1 && showID == order.order_sn && order.button_models && (order.button_models.length > 2 || Object.values(order.button_models).length > 2)">
                <template v-for="(item, i) in order.button_models">
                  <p :key="i" v-if="i >= 3" @click="operation(item, order, order.barter)"
                    :class="[!item.api && item.value != '41' ? 'noClickBG' : '']">{{ item.name }}</p>
                </template>
              </div>
            </template>
          </div>

        </div>
      </van-checkbox-group>

      <div class="qrcode">
        <van-popup v-model="showQrcode" position="right" modal="false">
          <div>
            <img :src="qrcode" style="width: 100%;" />
            <div style="height: 1.875rem;">请核销员扫码</div>
          </div>
        </van-popup>
      </div>

      <van-dialog @touchmove.native="stopmove" @mousemove.native="stopmove" v-model="dialogVisible"
        :showConfirmButton="false">
        <div class="title">确认发货</div>
        <template v-if="orderType != 'storeMang'">
          <van-tabs v-model="activeName">
            <van-tab name="first" title="快递配送"></van-tab>
            <van-tab name="second" v-if="isShowDri" title="司机配送"></van-tab>
          </van-tabs>
        </template>
        <div>
          <div v-show="activeName == 'first'">
            <section style="width: 100%; text-align: left; padding-bottom: 2.5rem; padding-top: 0.625rem;">
              <div style="width: 100%;" v-if="addresseeInfo && jurisdiction_set != 1">
                <div class="addressee">收件人信息:</div>
                <div>
                  <div class="user_name">
                    <span>{{ addresseeInfo.realname }}</span>
                    <span>({{ addresseeInfo.mobile }})</span>
                  </div>
                  <div class="user_city">{{ addresseeInfo.address }}</div>
                </div>
              </div>
              <div class="select_company">
                <div style="font-weight: bold; font-size: 15px;">快递公司:</div>
                <div class="company_right">
                  <van-button plain type="primary" @click="seleRegional">{{ regional }}</van-button>
                </div>
              </div>
              <div class="input_number">
                <div style="font-weight: bold; font-size: 15px;">快递单号:</div>
                <div class="number_right">
                  <van-cell-group>
                    <van-field v-model="numberName" placeholder="请输入快递单号" />
                  </van-cell-group>
                </div>
              </div>
            </section>
          </div>
          <div v-show="activeName == 'second'">
            <section style="width: 100%; text-align: left; padding-bottom: 2.5rem; padding-top: 0.625rem;">
              <div style="width: 100%;" v-if="addresseeInfo">
                <div class="addressee">收件人信息:</div>
                <div>
                  <div class="user_name">
                    <span>{{ addresseeInfo.realname }}</span>
                    <span>({{ addresseeInfo.mobile }})</span>
                  </div>
                  <div class="user_city">{{ addresseeInfo.address }}</div>
                </div>
              </div>
              <div class="select_company" style="justify-content: flex-start;">
                <div style="font-weight: bold; font-size: 15px; width: 5rem;">配送司机:</div>
                <div class="company_right" style="text-align: left; margin-left: 0.5rem;">
                  <van-button style="text-align: left;" plain type="primary" @click="driverSeleRegional">{{ driverRegional
                  }}</van-button>
                </div>
              </div>
              <div class="select_company" style="justify-content: flex-start;">
                <div style="font-weight: bold; font-size: 15px; width: 5rem;">车牌号:</div>
                <div class="company_right" style="text-align: left; margin-left: 0.5rem;">{{ driverNumber }}</div>
              </div>
            </section>
          </div>
        </div>
        <div class="store_foot">
          <van-button type="default" class="btn_a" @click="sendCancel">取 消</van-button>
          <van-button type="primary" class="btn_b" @click="sendGoogs">确 定</van-button>
        </div>
      </van-dialog>
      <van-popup v-model="dateshow_1" position="bottom" :overlay="true">
        <van-search class="express-select-search" placeholder="请输入快递公司名称" clearable v-model="inputExpressCompanyName"
          v-show="columns.length > 0"></van-search>
        <van-picker @touchmove.native="stoppao" @mousemove.native="stoppao" :columns="filterExpressCompanys"
          @change="onChange" @cancel="onCancelbtn" @confirm="onConfirmbtn" show-toolbar></van-picker>
      </van-popup>
      <van-popup v-model="driverDateshow_1" position="bottom" :overlay="true">
        <van-picker @touchmove.native="stoppao" @mousemove.native="stoppao" :columns="driverColumns"
          @change="onDriverChange" @cancel="onDriverCancelbtn" @confirm="onDriverConfirmbtn" show-toolbar />
      </van-popup>
      <!-- 配送站的确认核销按钮 -->
      <van-popup v-model="showWriteOff" position="center" :overlay="true" round>
        <img :src="writeOffQR" style="width: 11.25rem; height: 11.25rem; margin: 1rem;" />
        <div style="font-size: 18px; font-weight: bold; margin-bottom: 1rem; color: #f15353;">
          请核销员扫码
        </div>
      </van-popup>
      <div class="blank" v-if="datasource && datasource.length <= 0 && !isDefault">
        <img src="../assets/images/blank.png" />
        <span>还没有订单记录哦</span>
      </div>
      <van-dialog v-model="showBarter" title="易货兑换" show-cancel-button class="barter_dialog" @confirm="confirmBarter"
        @cancel="cancelBarter">
        <div class="barter_dialog_1">是否确认易货兑换</div>
        <div class="barter_dialog_2">该商品可兑换易货值为{{ showBarter_value }}</div>
      </van-dialog>

      <van-overlay :show="blindBoxInfo.show" z-index="99">
        <div style="display: flex; align-items: center; justify-content: center; height: 100%;">
          <transition name="van-fade">
            <div class="blindBoxInfo" v-if="blindBoxInfo.show">
              <div class="multipleWrapper">
                <div class="desc">盲盒商品</div>
                <div class="goodsWrapper" @touchmove.stop>
                  <router-link :to="fun.getUrl(detailUrl == 'HotelOrderDetail' ? 'HotelOrderDetail' : detailUrl, {
                    order_id: item.id,
                    orderType: orderType
                  })
                    " v-for="item in blindBoxInfo.goods" :key="item.id">
                    <div class="goodsItem">
                      <div class="goodInfo">
                        <div class="c1">{{ item.order_sn }}</div>
                        <div class="c2">{{ item.status_name }}</div>
                      </div>
                      <div class="goodContent" v-for="item1 in item.has_many_order_goods" :key="item1.id">
                        <div class="goods_img">
                          <img :src="item1.thumb" alt="" referrerPolicy="no-referrer"/>
                        </div>
                        <div class="content">
                          <div class="name">{{ item1.title }}</div>
                          <div class="price">{{ item1.goods_option_title }}</div>
                        </div>
                      </div>
                    </div>
                  </router-link>
                </div>
              </div>

              <div class="close">
                <i class="iconfont icon-adsystem_icon_cancle" @click="blindBoxInfo.show = false"></i>
              </div>
            </div>
          </transition>
        </div>
      </van-overlay>

      <van-popup v-model="refundShow" position="bottom" round closeable :style="{ height: '50%' }">
        <div class="refundShow-box">
          <div class="popup-title">关闭原因</div>
          <div class="popup-context">{{ refundText }}</div>
        </div>
      </van-popup>

      <!--S 申请存货的dialog -->
      <van-dialog v-model="inventoryApplyPopup" class="inventory-apply-popup" title="请选择" show-cancel-button
        @confirm="confirmInventoryApply">
        <van-radio-group v-model="inventoryApplyRadio">
          <van-radio :name="item.id" v-for="item in inventoryApplyList" :key="item.id" checked-color="#ee0a24">{{
            item.name }}</van-radio>
        </van-radio-group>
      </van-dialog>
      <!--E 申请存货的dialog -->
    </div>
    <div @touchstart.stop @touchmove.stop>
      <van-dialog v-model="custom_receipt_confirmation_show" :lock-scroll="true"
        :title="custom_receipt_confirmation_btn.name" show-cancel-button @confirm="CustomReceiptConfirmationSend">
        <div v-html="custom_receipt_confirmation_html" class="custom_receipt_confirmation_html"></div>
      </van-dialog>
    </div>
    <yz-service v-model="showKefu" :url='cservice' :mobile='service_mobile' :qr="service_QRcode"></yz-service>

    <!-- 新盲盒 -->
    <issue-goods :overlayShow.sync="overlayShow" v-if="overlayShow" :newBlindBoxData="newBlindBoxData"></issue-goods>
    <drawGoods :drawShow.sync="drawShow" :type="drawType" v-if="drawShow" :newBlindBoxData="newBlindBoxData"></drawGoods>

    <!-- 售后类型 -->
    <returnTypePop ref="returnType" :refundTypes="refundTypes" @confirm="confrimReturnType" />

    <!-- 选择售后商品 -->
    <returnGoodsPop ref="returnGoods" :goodsList="returnAllGoodsList" @confirm="confrimReturnGoods" />
  </div>
</template>
<script>
import yzService from "components/ui_components/yz_service.vue";
import { Toast, Search } from "vant";
import issueGoods from "@/views/new_blind_box/issueGoods/index"; //新盲盒商品
import drawGoods from "@/views/new_blind_box/drawGoods/index"; //新盲盒商品-恭喜中奖

import returnTypePop from "../views/member/order/components/returnTypePop";
import returnGoodsPop from "../views/member/order/components/returnGoodsPop";

export default {
  //select_inde-当前选择行,datasource-数据源,currentdata-当前选择的数据
  //isDefault 判读是否用当前的空样式isDefault为false或者不传则显示
  props: ["datasource", "status", "getAllLoaded", "orderType", "detailUrl", "custom_receipt_confirmation_html", "isDefault", "isOrder", "order_manage_hidden_value"],
  data() {
    return {
      regional: "请选择快递公司",
      dateshow_1: false,
      columns: [],
      isShow: false,
      toi: this.fun.getKeyByI(),
      checkList: [],
      loading: false,
      allLoaded: false,
      goload: true,
      qrcode: "",
      showQrcode: false,
      //确认发货
      dialogVisible: false,
      expressName: "",
      numberName: "",
      addresseeInfo: "",
      options: [],
      orderPayId: "",
      showWriteOff: false,
      writeOffQR: "", //配送站订单确认核销 按钮展示的二维码
      //   actions:[],
      //   sheetVisible:''
      //司机配送确认发货
      isShowDri: false, //确认按钮是否显示司机配送
      driverDialogVisible: false,
      driverId: "",
      driverOptions: [],
      driverColumns: [],
      driverRegional: "请选择配送司机",
      driverDateshow_1: false,
      driverApi: "",
      driverNumber: "",
      activeName: "first",
      jurisdiction_set: "", //供应商订单是否显示会员信息
      showBarter: false,
      showBarter_value: null,
      noMoreClick: false, //防止快速点击重复触发

      showID: "",

      blindBoxInfo: {
        show: false,
        goods: []
        //盲盒相关数据
      },
      filterExpressCompanys: [],
      inputExpressCompanyName: "",

      refundShow: false, //退款原因
      refundText: "",
      consolidated: "",

      custom_receipt_confirmation_show: false, //自定义确认收货弹窗
      custom_receipt_confirmation_btn: {}, //自定义确认收货弹窗按钮
      custom_receipt_confirmation_item: {}, //自定义确认收货弹窗item

      //S 申请存货弹窗
      inventoryApplyPopup: false, //存货申请弹窗
      inventoryApplyList: [], //仓库列表
      inventoryApplyRadio: null,

      // 客服弹窗
      showKefu: false,
      cservice: "",
      service_QRcode: "",
      service_mobile: "",

      //E 申请存货弹窗
      vip_show: JSON.parse(window.localStorage.getItem("globalParameter")).vip_show ? JSON.parse(window.localStorage.getItem("globalParameter")).vip_show : false,

      overlayShow: false, //盲盒商品-弹窗
      drawShow: false, //盲盒商品-恭喜中奖-弹窗
      drawType: 1, //中奖类型
      newBlindBoxData: {}, //盲盒商品-开箱数据
      self_reward_name:'',
    };
  },
  mounted() {
    console.log(this.consolidated);
    let yz_basic_info = JSON.parse(localStorage.getItem("yz_basic_info"));
    if ( yz_basic_info.plugin_setting?.cloud_shop?.open_state == 1 ){
      this.self_reward_name = yz_basic_info.plugin_setting?.cloud_shop.self_reward_name;
    }
    // console.log(this.orderType, "参数", this.datasource);
  },
  methods: {
    goto_store(goods_id){
      this.$router.push(this.fun.getUrl("local_life_apply_store", { goods_id}));
    },
    checkAll(bollean){
      if(bollean){
        let ids = [];
        this.datasource.forEach(item=>{
          ids.push(item.id);
        })
        this.checkList = ids;
        }else{
         this.checkList  = [];
      }
    },
    formatTime(order){
      if(order.plugin_id == 164 && order.has_one_lease_order&&order.has_one_lease_order.end_time){
        if(order.has_one_lease_order.end_time=='1970-01-01 08:00:00'){ //时间为空是返回初始时间后端那边要后面再处理，现在先这样处理;
          return '';
        }else{
          return order.has_one_lease_order.end_time;
        }
      }else{
        if(order.has_one_lease_toy_order&&order.has_one_lease_toy_order.end_time){
          if(order.has_one_lease_toy_order&&order.has_one_lease_toy_order.end_time=='1970-01-01 08:00:00'){
            return '';
          }else{
              return order.has_one_lease_toy_order.end_time;
          }
        }else{
          return "";
        }

      }
    },
    toStore(order) {
      if (order.plugin_id == 92) {
        this.$router.push(this.fun.getUrl("SupplierShop", { id: order.id, fromHome: 1 }, { fromOrder: 1 }));
      } else if (order?.store_specify_show?.url) {
        window.location.href = order.store_specify_show.url;
      } else if (order.plugin_id == 31 || order.plugin_id == 32) {
        this.$router.push(this.fun.getUrl("o2oStore_v2", { store_id: order.id, fromHome: 1 }, { fromOrder: 1 }));
      } else if (order.plugin_id == 54 && order.has_one_team_member.store_id) {
        this.$router.push(this.fun.getUrl("o2oStore_v2", { store_id: order.has_one_team_member.store_id, fromHome: 1 }));
      } else if (order.plugin_id == 0) {
        this.$router.push(this.fun.getUrl("home"));
      }
    },
    showMore(order_sn) {
      if (this.showID == order_sn) {
        this.showID = "";
      } else {
        this.showID = order_sn;
      }
    },
    setCheckList() {
      this.checkList = [];
    },
    operation(btn, order, barter) {

      // btn = {name: "确认发货", value: 24, api: "plugin.supplier.frontend.order.cancel-send"};
      if (!btn.api && btn.value != '41') {
        if (btn.value == "expediting_delivery") {
          Toast("已提醒过商家");
        }
        return;
      }
      this.orderPayId = order.id;
      if (btn.value == 8 || btn.value == "snatch_regiment_express") {
        this.checklogistics(order, btn);
      }else if(btn.value == 'local-life'){

        this.$router.push(this.fun.getUrl("local_life_order_details", { order_id: order.id }));
      }else if (btn.value == 51) {
        // 查看卡券
        this.$router.push(this.fun.getUrl("cpsPwd", { order_id: order.id }));
      } else if (btn.value == 10) {
        this.comment(order, btn);
      } else if (btn.value == 1 || btn.value == "snatch_regiment_pay") {
        this.toPay(order, btn);
      } else if (btn.value == 13 || btn.value == 54 || btn.value == "snatch_regiment_refund") {
        //退款
        this.toRefund(order, btn);
      } else if (btn.value == 101) {
        this.applyRefund(order, btn);
      } else if (btn.value == 9) {
        //取消订单
        this.cancleOrder(order, btn);
      } else if (btn.value == 5) {
        //确认订单
        this.confirmOrder(order, btn);
      } else if (btn.value == 99) {
        this.confirmOrder_dragon(order, btn);
      } else if (btn.value == 18) {
        //退款中
        this.toRefundDetail(order, btn);
      } else if (btn.value == 56) {
        // console.log('ddd');
        //退款中
        //  this.toRefund(order, btn);
        this.$router.push(this.fun.getUrl("MyProject"));
      } else if (btn.value == "cashierPay") {
        //更多
        this.cashPayOrder(order, btn);
      } else if (btn.value == "verification_code") {
        this.verification(order, btn);
      } else if (btn.value == 20) {
        this.verificationCash(order, btn);
      } else if (btn.value == 21) {
        // console.log('转账信息',order);
        this.$router.push(
          this.fun.getUrl("OrderRecord", {
            order_id: order.id
          })
        );
      } else if (btn.value == 22 || btn.value === "delivery_station_pay" || btn.value === "service_station_pay") {
        // 确认支付
        this.publicMessage(order, btn, "支付");
      } else if (btn.value == 23 || btn.value == 60) {
        // 确认发货
        if (order.dispatch_type_id == 3) {
          this.sendGoogs();
        } else {
          this.getCompany();
          this.dialogVisible = true;
        }
        this.expressName = "";
        this.numberName = "";
        if (JSON.parse(window.localStorage.getItem("globalParameter")).delivery_driver_open == "1" && (this.orderType == "supplier" || this.orderType == "store")) {
          this.isShowDri = true;
          this.driverId = "";
          this.driverNumber = "";
          this.driverRegional = "请选择配送司机";
          this.driverApi = btn.api;
          this.supplierDriverSend();
          // this.driverDialogVisible = true;
        }
      } else if (btn.value == 24 || btn.value == 61 || btn.value === "service_station_cancel_send") {
        //取消发货
        this.publicMessage(order, btn, "取消发货");
      } else if (btn.value == 25 || btn.value === "delivery_station_complete" || btn.value === "service_station_complete") {
        //确认收货
        this.publicMessage(order, btn, "收货");
      } else if (btn.value == 26 || btn.value === "delivery_station_close" || btn.value === "service_station_close") {
        //关闭订单
        this.publicMessage(order, btn, "关闭");
      } else if (btn.value == 30) {
        //退款关闭订单
        this.publicMessage(order, btn, "退款关闭订单");
      } else if (btn.value == 27) {
        this.evaluate(order, btn);
      } else if (btn.value == 28) {
        //卡密
        this.truckList(btn, order);
      } else if (btn.value == 41) {
        //398售后
        console.log(order.has_many_order_goods, 'dwwwwwwww')
        this.getKefu(order.has_many_order_goods);
        // window.location.href = btn.api;
      } else if (btn.value == 50) {
        //查看发票
        this.checkInvoice(btn, order);
      } else if (btn.value == 11) {
        //酒店确认下单
        this.confirmHotelOrder(btn.api, order.id);
      } else if (btn.value == "coupon") {
        //分享优惠券
        this.$router.push(this.fun.getUrl("couponShare", { order_id: order.id }));
      } else if (btn.value === "check_out") {
        this.publicMessage(order, btn, "退房");
      } else if (
        btn.value === "clerk_code" ||
        btn.value === "package_deliver" ||
        btn.value == "reserve_simple" ||
        btn.value == "package_delivery_confirm_code" ||
        btn.value === "store_package_deliver"
      ) {
        //确认核销
        this.confirmWriteOff(order, btn);
      } else if (btn.value === "service_station_send") {
        //服务站的确认发货
        this.getCompany();
        this.dialogVisible = true;
        this.expressName = "";
        this.numberName = "";
      } else if (btn.value == "lease_toy_refund" || btn.value == "package_deliver_clerk") {
        // 申请退还
        this.getReturn(btn, order);
      } else if (btn.value == "lease_toy_apply_adopt" || btn.value == "yz_lease_apply_adopt") {
        // 填写归还
        console.log("填写归还啊啊啊啊");
        if (btn.value == "yz_lease_apply_adopt") {
          this.$router.push(this.fun.getUrl("yz_lease_apply_adopt", { id: order.id }));
          return
        }
        this.$router.push(this.fun.getUrl("OrderReturn", { id: order.id }));
      } else if (btn.value == 'yz_lease_refund') {
        this.publicMessage(order, btn, "申请归还");
      } else if (btn.value == "lease_toy_return_info" || btn.value == "yz_lease_return_info") {
        // 归还详情
        if (btn.value == 'yz_lease_return_info') {
          this.$router.push(this.fun.getUrl("yz_lease_return_info", { id: order.id }));
          return
        }
        this.$router.push(this.fun.getUrl("orderruturninfo", { id: order.id }));
      } else if (btn.value == "hotel_supply") {
        this.$router.push(this.fun.getUrl("hotelOrder", { id: order.id }));
      } else if (btn.value == "expediting_delivery") {
        this.publicMessage(order, btn, "提醒商家发货");
      } else if (btn.value == "snatch_regiment_barter") {
        // 抢团易货兑换
        this.showBarter = true;
        this.showBarter_value = barter;
      } else if (btn.value == 53) {
        this.getBlindBoxGoods(order.id);
      } else if (btn.value == "close_reason") {
        this.refundShow = true;
        this.refundText = order.close_reason;
      } else if (btn.value == 140) {
        // 卡券信息
        this.$router.push(this.fun.getUrl("cardVoucherInfo", { order_id: order.id }));
      } else if (btn.value == "inventory_cancel") {
        this.publicMessage(order, btn, "发货");
      } else if (btn.value == "inventory_apply") {
        this.getWarehouseList_CH(); //获取仓库列表(申请存货)
      } else if (btn.value == "city_delivery_detail") {
        this.$router.push(this.fun.getUrl("orderLogisticsDetails", {}, { id: order.id }));
      } else if (btn.value == "apply_invoice") {
        this.invoicing(order);
      } else if (btn.value == "new_blind_box_unpacking") { // 新盲盒商品-去开箱
        this.$router.push(this.fun.getUrl('blindBox', { order_id: order.id }));
      } else if (btn.value == "new_blind_box_goods") { // 新盲盒商品-未点发货或兑换
        this.overlayShow = true;
        this.newBlindBoxData = {
          api: btn.api,
          order_id: order.id
        };
      } else if (btn.value == "new_blind_box_exchange_order") { // 新盲盒商品-兑换积分
        this.newBlindBoxData = {
          api: btn.api,
          order_id: order.id
        };
        this.drawType = 2;
        this.drawShow = true;
      } else if (btn.value == "new_blind_box_sub_order") { // 已兑换
        this.newBlindBoxData = {
          api: btn.api,
          order_id: order.id
        };
        this.drawType = 1;
        this.drawShow = true;
      } else if (btn.value == "coffee_store_code_list") {
        this.$router.push(this.fun.getUrl("coffee_machine_verification", { order_id: order.id }));
      } else if (btn.value == "video-demand") {
        // this.$router.push(this.fun.getUrl("coffee_machine_verification", { goods_id: order.has_many_order_goods[0].goods_id }));
        this.$router.push(this.fun.getUrl("video_on_demand_list",{},{goods_id: order.has_many_order_goods[0]?.goods_id }));
      } else if (btn.value == "store-projects"){
        this.$router.push(this.fun.getUrl("MyProject",{},{ order_id: order.id }));
      } else {
        this.publicMessage(order, btn, btn.name);
      }
    },
    invoicing(order) {
      this.$emit("apply_invoice", order);
    },
    confirmBarter() {
      let that = this;
      $http.get("plugin.snatch-regiment.api.order.barter", { order_id: that.orderPayId }).then(
        function (response) {
          if (response.result == 1) {
            that.$notify({
              background: "#f0f9eb",
              message: `易货兑换成功`,
              color: "#67c23a"
            });
            that.$emit("ConfrimOrderNotification", "pay");
          } else {
            that.$dialog.alert({ message: response.msg });
          }
        },
        function (response) {
          console.log(response);
        }
      );
    },
    cancelBarter() {
      this.showBarter = false;
      this.showBarter_value = null;
    },
    //司机配送确认发货
    supplierDriverSend() {
      var that = this;
      var urls = "plugin.delivery-driver.home.delivery-info.get-driver-list";
      if (that.noMoreClick) {
        return;
      }
      that.noMoreClick = true;
      $http.get(urls, {}).then(
        function (response) {
          console.log("oo++3", response);
          that.noMoreClick = false;
          if (response.result == 1) {
            that.driverOptions = [];
            that.driverOptions = response.data;
            var arrayOfSquares = that.driverOptions.map(function (item) {
              return item.driver_name + "(" + item.user_phone + ")";
            });
            that.driverColumns = arrayOfSquares;
          } else {
            that.$dialog.alert({ message: response.msg });
          }
        },
        function (response) {
          that.noMoreClick = false;
          console.log(response);
        }
      );
    },
    /*以下四个都是下拉司机配送选择相关方法*/
    driverSeleRegional: function () {
      this.driverDateshow_1 = true;
    },
    onDriverChange(picker, value, index) { },
    onDriverCancelbtn: function (val, index) {
      this.driverDateshow_1 = false;
    },
    onDriverConfirmbtn: function (val, index) {
      var array = this.driverOptions;
      this.driverDateshow_1 = false;
      this.driverRegional = val;
      this.driverNumber = array[index].license_number;
      this.driverId = array[index].id;
    },
    //司机配送确认发货取消
    driverSendCancel() {
      this.driverDialogVisible = false;
    },
    //查看发票
    checkInvoice(btn, order) {
      this.$router.push(this.fun.getUrl("Invoice", { order_id: order.id }));
    },
    //卡密
    truckList(btn, order) {
      this.$router.push(this.fun.getUrl("TruckList", { order_id: order.id }));
    },
    // 评价
    evaluate(order, btn) {
      this.$router.push(
        this.fun.getUrl("DeliveryEvaluate", {
          order_id: order.id,
          api: btn.api,
          name: "distributor"
        })
      );
    },
    // 申请归还的操作
    getReturn(btn, order) {
      let that = this;
      if (this.noMoreClick) {
        return;
      }
      that.noMoreClick = true;
      $http.get(btn.api, { order_id: order.id }).then(res => {
        that.noMoreClick = false;
        if (res.result == 1) {
          that.$dialog.alert({ message: res.msg });

          that.$emit("ConfrimOrderNotification");
        } else {
          that.$dialog.alert({ message: res.msg });
        }
      });
    },

    publicMessage(order, btn, text) {
      let _text = text || "";
      if (!btn.api) {
        return;
      }
      this.$dialog
        .confirm({
          message: `${this.$i18n.t('base.confirm')} ${_text}?` ,
          confirmButtonText: this.$i18n.t('base.confirm'),
          cancelButtonText: this.$i18n.t('base.cancel')
        })
        .then(() => {
          var that = this;
          let json = {
            order_id: that.orderPayId
          };
          let urls = btn.api || "";
          if (that.noMoreClick) {
            return;
          }
          that.noMoreClick = true;
          $http.get(urls, json).then(
            function (response) {
              that.noMoreClick = false;
              if (response.result == 1) {
                that.$emit("ConfrimOrderNotification", "pay");
                if (btn.value == "inventory_cancel") {
                  that.$dialog
                    .confirm({
                      message: `申请成功,请到待发货列表查询此订单`
                    })
                    .then(() => { })
                    .catch(() => { });
                } else if (btn.value == "inventory_apply") {
                  // Toast('存货成功请到存货列表查询此订单');
                  that.$dialog
                    .confirm({
                      message: `存货成功,请到存货列表查询此订单`
                    })
                    .then(() => { })
                    .catch(() => { });
                } else if (btn.value == "yz_lease_refund") {
                  that.$toast("申请归还成功")
                } else {
                  that.$notify({
                    background: "#f0f9eb",
                    message: `${_text}成功`,
                    color: "#67c23a"
                  });
                }
              } else {
                that.$dialog.alert({ message: response.msg });
              }
            },
            function (response) {
              that.noMoreClick = false;
              console.log(response);
            }
          );
        })
        .catch(() => { });
    },

    confirmWriteOff(order, btn) {
      var that = this;
      let url = "";
      let json = {};
      if (btn.value == "clerk_code") {
        url = "plugin.delivery-station.frontend.order.detail.qr-code-url";
        json = { order_id: order.id };
      } else if (btn.value == "package_deliver") {
        url = btn.api;
        json = { order_id: order.id };
      } else if (btn.value == "reserve_simple") {
        url = btn.api;
        json = { id: order.id };
      } else {
        url = btn.api;
        json = { order_id: order.id };
      }
      $http.get(url, json, "正在获取核销码").then(
        function (response) {
          if (response.result == 1) {
            if (btn.value == "clerk_code") {
              that.writeOffQR = response.data.qrcode_url;
            } else if (btn.value == "package_deliver" || btn.value == "reserve_simple") {
              that.writeOffQR = response.data.qr_code_url;
            } else {
              that.writeOffQR = response.data.qr_code_url;
            }
            that.showWriteOff = true;
          } else {
            that.$dialog.alert({ message: response.msg });
          }
        },
        function (response) {
          console.log(response);
        }
      );
    },
    //获取快递公司
    getCompany(btn) {
      let that = this;
      let urls = "";
      if (this.orderType == "supplier") {
        urls = "plugin.supplier.frontend.order.express-company";
      } else if (this.orderType == "serviceReplenish") {
        urls = "plugin.service-station.frontend.order-list.express";
      } else if (this.orderType == "auction") {
        urls = "plugin.auction.api.sendOrder";
      } else if (this.orderType == "auctioneer") {
        urls = "plugin.auction.api.sendOrder";
      } else if (this.orderType == "subsidiary") {
        urls = "plugin.subsidiary.frontend.order.express-company";
      } else if (this.orderType == "storeMang") {
        urls = "plugin.shop-assistant.frontend.order.expressCompanies";
      } else {
        urls = "plugin.store-cashier.frontend.store.center.sendOrder";
      }
      if (that.noMoreClick) {
        return;
      }
      that.noMoreClick = true;
      $http.get(urls, { order_id: that.orderPayId }).then(
        function (response) {
          console.log("oo++3", response);
          that.noMoreClick = false;
          if (response.result == 1) {
            if (that.orderType == "supplier") {
              that.jurisdiction_set = response.data.jurisdiction_set;
            }
            that.options = [];
            that.options = response.data.express_companies;
            let arr = that.options;
            if (that.options && !(that.options instanceof Array)) {
              arr = Object.values(that.options);
            }
            let arrayOfSquares = arr.map(function (item) {
              return item.name;
            });
            that.columns = arrayOfSquares;
            that.filterExpressCompanys = arrayOfSquares;
            that.addresseeInfo = response.data.address;
            if (that.regional && that.regional !== '请选择快递公司') {
              arr.forEach(item => {
                if (item.name == that.regional) {
                  that.expressName = {
                    value: item.value,
                    name: item.name
                  }
                }
              })
            }
          } else {
            that.$dialog.alert({ message: response.msg });
          }
        },
        function (response) {
          that.noMoreClick = false;
          console.log(response);
        }
      );
    },
    //快递公司选择监听
    selectCompany(value) {
      console.log(value, this.expressName);
    },
    //确认发货取消
    sendCancel() {
      this.dialogVisible = false;
    },
    //确认发货
    sendGoogs() {
      var that = this;
      // if (that.expressName == "" && that.numberName == "") {
      //   that.$notify("请选择快递公司和输入快递单号");
      //   return;
      // } else if (that.expressName == "") {
      //   that.$notify("请选择快递公司");
      //   return;
      // } else if (that.numberName == "") {
      //   that.$notify("请输入快递单号");
      //   return;
      // }
      let json = {};
      if (this.isShowDri && that.activeName == "second") {
        json.order_id = that.orderPayId;
        json.dispatch_type_id = 7;
        json.driver_id = that.driverId;
      } else {
        json.order_id = that.orderPayId;
        json.express_code = that.expressName.value;
        json.express_company_name = that.expressName.name;
        json.express_sn = that.numberName;
      }
      let _urls = "";
      if (this.orderType == "supplier") {
        _urls = "plugin.supplier.frontend.order.send";
      } else if (this.orderType == "serviceReplenish") {
        _urls = "plugin.service-station.frontend.order.order-operation.send";
      } else if (this.orderType == "subsidiary") {
        _urls = "plugin.subsidiary.frontend.order.send";
      } else if (this.orderType == "auction") {
        _urls = "plugin.auction.api.order-operation.send";
      } else if (this.orderType == "auctioneer") {
        _urls = "plugin.auction.api.order-operation.send";
      } else if (this.orderType == "storeMang") {
        _urls = "plugin.shop-assistant.frontend.order.send";
      } else {
        _urls = "plugin.store-cashier.frontend.store.center.order-operation.send";
      }

      if (that.noMoreClick) {
        return;
      }
      that.noMoreClick = true;
      $http.get(_urls, json).then(
        function (response) {
          that.noMoreClick = false;
          if (response.result == 1) {
            that.dialogVisible = false;
            that.$emit("ConfrimOrderNotification", "pay");
            that.$notify({
              background: "#f0f9eb",
              message: "发货成功",
              color: "#67c23a"
            });
          } else {
            that.$dialog.alert({ message: response.msg });
          }
        },
        function (response) {
          that.noMoreClick = false;
          console.log(response);
        }
      );
    },
    //多订单合并支付的响应方法
    multiplePayChange(value) {
      this.$emit("MultiplePayNotification", this.checkList);
    },
    toDetail(order) {
      this.$emit("ToDetailNotification", order);
    },

    //查看物流
    checklogistics(item, btn) {
      //回放轨迹
      console.log(JSON.parse(window.localStorage.getItem("globalParameter")).delivery_driver_open);
      if (item.dispatch_type_id == 7 && JSON.parse(window.localStorage.getItem("globalParameter")).delivery_driver_open == "1") {
        this.$router.push(
          this.fun.getUrl("track", {
            id: item.id
          })
        );
      }
      if (item.is_all_send_goods == 0) {
        this.$router.push(
          this.fun.getUrl("logistics", {
            id: item.id,
            fromGrab: 1,
            api: btn.api
          }, { id: item.id })
        );
      } else {
        //跳转多包裹路由
        // item.is_all_send_goods == 1 || item.is_all_send_goods == 2
        this.$router.push(
          this.fun.getUrl(
            "multiplePackages",
            {
              order_id: item.id //传送订单id到多包裹页面
            },
            { api: btn.api }
          )
        );
      }
    },
    cashPayOrder(item, btn) {
      this.$dialog
        .confirm({ message: "确定此订单已付款?" })
        .then(() => {
          // this.datasource.splice(this.datasource.indexOf(item), 1);
          this.sentRequest(
            btn.api,
            {
              order_id: item.id,
              order_pay_id: this.order_pay_id
            },
            false
          );
        })
        .catch(() => { });
    },
    verification(item, btn) {
      this.$router.push(
        this.fun.getUrl("orderVerification", {
          order_id: item.id,
          api: btn.api
        })
      );
    },
    verificationCash(item, btn) {
      this.$dialog
        .confirm({ message: "确定此订单已付款?" })
        .then(() => {
          // this.datasource.splice(this.datasource.indexOf(item), 1);
          this.sentRequest(
            btn.api,
            {
              order_id: item.id,
              order_pay_id: this.order_pay_id
            },
            false
          );
        })
        .catch(() => { });
    },
    //取消订单
    cancleOrder(item, btn) {
      this.$dialog
        .confirm({ message: "确定取消此订单?" })
        .then(() => {
          //删除当前选中的地址
          this.datasource.splice(this.datasource.indexOf(item), 1);
          this.sentRequest(
            btn.api,
            {
              order_id: item.id
            },
            false
          );
        })
        .catch(() => { });
    },
    //删除订单
    deleteOrder(item, btn) {
      this.$dialog
        .confirm({ message: "确定删除此订单?" })
        .then(() => {
          //删除当前选中的地址
          this.datasource.splice(this.datasource.indexOf(item), 1);
          this.sentRequest(
            btn.api,
            {
              order_id: item.id
            },
            false
          );
        })
        .catch(() => { });
    },
    toPay(item, btn) {
      //status-2合并支付 type-1订单支付
      if (item.plugin_id == 71) {
        this.$router.push(
          this.fun.getUrl(
            "orderpay",
            {
              status: 2,
              order_ids: item.id,
              iscps: true
            },
            { api: btn.api }
          )
        );
        return;
      }
      if(item.plugin_id == 154) {
        this.$router.push(
          this.fun.getUrl(
            "orderpay",
            {
              status: 2,
              order_ids: item.id,
            },
            {
              tag:'tourAround',
              api: btn.api,
              ordersn:item.order_sn
            }
          )
        );
        return;
      }
      this.$router.push(
        this.fun.getUrl(
          "orderpay",
          {
            status: 2,
            order_ids: item.id,
            orderType:this.$route.params.orderType
          },
          { api: btn.api }
        )
      );
    },
    //评价订单
    comment(item, btn) {
      this.$router.push(
        this.fun.getUrl("comment", {
          order: item
        })
      );
    },
    //确认收货
    confirmOrder(item, btn) {
      console.log(item, btn);
      if ((item.plugin_id == 0 || item.plugin_id == 44) && this.custom_receipt_confirmation_html !== "") {
        this.custom_receipt_confirmation_btn = btn;
        this.custom_receipt_confirmation_item = item;
        this.custom_receipt_confirmation_show = true;
        return;
      }
      this.$dialog
        .confirm({ message: btn.name })
        .then(() => {
          this.confirmOrder_request(item, btn);
        })
        .catch(() => { });
    },

    CustomReceiptConfirmationSend() {
      this.confirmOrder_request(this.custom_receipt_confirmation_item, this.custom_receipt_confirmation_btn);
    },

    confirmOrder_request(item, btn) {
      //this.$emit('ConfrimOrderNotification');
      //调用接口通知服务器收到货物请求
      var that = this;
      if (that.noMoreClick) {
        return;
      }
      that.noMoreClick = true;
      $http
        .get(
          btn.api,
          {
            order_id: item.id
          },
          "操作中..."
        )
        .then(
          function (response) {
            that.noMoreClick = false;
            if (response.result == 1) {
              that.$emit("ConfrimOrderNotification", "pay");
              that.$dialog.alert({ message: response.msg });
            } else {
              that.$dialog.alert({ message: response.msg });
            }
          },
          function (response) {
            // error callback
            that.noMoreClick = false;
          }
        );
    },

    //龙存管公共支付方法
    dragonPay(item) {
      let obj = item.form_data;
      var form = document.createElement("form");
      form.method = "post";
      form.setAttribute("action", item.action_url);
      let arr = ["INFO", "BODY", "SIGN", "CONTENTTYPE"];
      for (let i of arr) {
        let a = document.createElement("input");
        a.setAttribute("name", i);
        a.setAttribute("value", obj[i]);
        form.appendChild(a);
      }
      document.body.appendChild(form);
      form.style.display = "none";
      form.submit();
      return form;
    },
    //龙存管确认收货
    confirmOrder_dragon(item, btn) {
      this.$dialog
        .confirm({ message: btn.name })
        .then(() => {
          //this.$emit('ConfrimOrderNotification');
          //调用接口通知服务器收到货物请求
          var that = this;
          if (that.noMoreClick) {
            return;
          }
          that.noMoreClick = true;
          $http
            .get(
              btn.api,
              {
                order_id: item.id
              },
              "操作中..."
            )
            .then(
              function (response) {
                that.noMoreClick = false;
                if (response.result == 1) {
                  that.dragonPay(response.data);
                  that.$emit("ConfrimOrderNotification", item);
                } else {
                  that.$dialog.alert({ message: response.msg });
                }
              },
              function (response) {
                that.noMoreClick = false;
                // error callback
              }
            );
        })
        .catch(() => { });
    },
    //追加评价
    reCommend(item, btn) { },
    toRefundDetail(item, btn) {
      let params = {},query = {};

      if (item.plugin_id == 154) {
           params ={ refund_id: item.travel_around_refund?.id}
           query = { pluginid: item.plugin_id }
      } else {
          params = {refund_id: item.refund_id}
          if(this.$route.params.orderType=='local-life'){
            query.plugin = 'local_life';
          }
      }
       this.$router.push(this.fun.getUrl("aftersales",params,query));
    },
    getRefundInfo(order_id) {
      let url = "refund.apply";
      // if (this.$route.query && this.$route.query.value && this.$route.query.value == 54) {
      //   url = "plugin.blind-box.api.apply.index";
      // } else if (this.$route.query && this.$route.query.refundType && this.$route.query.refundType == "installationSever") {
      //   url = "plugin.live-install.frontend.apply.index";
      // } else if (this.$route.params.order_type == 4) {
      //   //周边游的退款信息
      //   url = "plugin.travel-around.frontend.refund.refund";
      //   if(this.$route.query.orderType === 'travelAround') { //周边游回显
      //     let refundData = JSON.parse(this.$route.query.refundData);
      //     this.returnReasons = refundData.reason;
      //     this.returnExplain = refundData.content;
      //     this.returnTypeItem.name = refundData.refund_type_name;
      //     this.fileList1 = refundData.image_url;
      //   }
      // }
      $http.get(url, { order_id}, "").then(
        response => {
          if (response.result == 1) {
            var mydata = response.data;
            this.refundable_freight = Number(mydata.refundable_freight) || 0; //可退运费
            this.refundable_other = Number(mydata.refundable_other) || 0; //其他费用
            this.freight_price = Number(mydata.refundable_freight) || 0; //可退运费
            this.other_price = Number(mydata.refundable_other) ||  0; //其他费用
            this.money = mydata.order.true_refund_amount || mydata.order.price || mydata?.order?.order_price;
            this.refundTypes = mydata.refundTypes;
            this.send_back_way = mydata.send_back_way;
            this.returnMethods = this.send_back_way && this.send_back_way[0] ? this.send_back_way[0].value : 0;
            this.order_status = mydata.order.status;
            // this.aroundPirce = Number(mydata.order_goods_price);
            if (mydata.order.order_goods) {
              this.returnAllGoodsList = mydata.order.order_goods.filter(item => {
                return item.refundable_total != 0;//说明该商品已经都退款，可退款的数量为0
              });
            }
            console.log(this.returnAllGoodsList);
            if (this.order_status >= 1 && mydata.support_batch) {
              //support_batch 参数 true 支持单商品退款 false不支持， 先判断下订单是否支持选择商品退款
              // 不支持的就显示商品就行了，提交时也不用传 order_goods 参数
              this.openComponentsPop("returnGoods");
            } else {
              if(this.$route.query.orderType !== 'travelAround') {
                this.openComponentsPop("returnType");

              }
            }
            if(this.$route.query.orderType === 'travelAround') { //周边游回显
              let refundData = JSON.parse(this.$route.query.refundData);
              console.log(refundData);
              this.returnTypeItem = this.refundTypes[refundData.refund_type];
            }
            //that.reasons = mydata.reasons;
          } else {
            this.$dialog.alert({ message: response.msg });
          }
        },
        response => {
          this.$dialog.alert({ message: response.msg });
        }
      );
    },
    //退款
    toRefund(item, btn) {
      console.log(btn);
      //refund
      if (btn.value == "snatch_regiment_refund") {
        this.getRefundInfo(item?.travel_around_order?.order_id);
        // this.$router.push(
        //   this.fun.getUrl(
        //     "refund",
        //     {
        //       order_id: item?.travel_around_order?.order_id,
        //       order_type: 3
        //     },
        //     { value: btn.value }
        //   )
        // );
      } else if (item.plugin_id == 154) { //周边游的退款方式
        console.log(btn.api);
        this.$router.push(
          this.fun.getUrl(
            "refund",
            {
              order_id: item.id,
              order_type: 4
            },
            { value: btn.value }
          )
        );
      } else {
        let params = {order_id: item.id,order_type: 1},query = {value: btn.value};
        if(this.$route.params.orderType=='local-life'){
          query.plugin = 'local_life';
        }
        this.$router.push(this.fun.getUrl("refund",params,query));
      }
    },
    applyRefund(item, btn) {
      let _params = {
        order_id: item.id,
        type: 1
      };
      if (this.orderType == "picking-card-one" || item.plugin_id == 95) _params.plugin = "one";
      this.$router.push(this.fun.getUrl("pickUpCardReimburse", _params));
    },
    sentRequest(action, params, isIndicator) {
      if (this.noMoreClick) {
        return;
      }
      this.noMoreClick = true;
      $http.get(action, params, "").then((response) => {
        this.noMoreClick = false;
        if (response.result == 1) {
          this.$dialog.alert({ message: response.msg });
          location.reload();
          // if (window.history.length <= 1) {
          //   this.$router.push(this.fun.getUrl("home", {}));
          // } else {
          //   this.$router.go(-1);
          // }
        } else {
          this.$dialog.alert({ message: response.msg });
        }
      },(response)=> {
        this.noMoreClick = false;
      });
    },
    sheetAction() {
      console.log(this.sheetVisible);
    },
    //更新
    loadTop() {
      // this.initData();
      // this.getOrderList(this.selected);
      alert("刷新");
      this.$refs.loadmore.onTopLoaded();
    },
    // 加载更多
    loadBottom() {
      console.log("加载更多");
      this.$refs.loadmore.onBottomLoaded();
      //this.allLoaded = true;// 若数据已全部获取完毕,不在显示加载更多组件
      if (this.getAllLoaded) {
        this.allLoaded = false;
      } else {
        this.allLoaded = true;
      }
    },
    /*以下四个都是下拉快递选择相关方法*/
    seleRegional: function () {
      this.dateshow_1 = true;
    },
    onChange(picker, value, index) { },
    onCancelbtn: function (val, index) {
      this.dateshow_1 = false;
      setTimeout(() => {
        this.inputExpressCompanyName = "";
      }, 100);
    },
    onConfirmbtn: function (val, index) {
      this.dateshow_1 = false;
      this.regional = val ? val : "请选择快递公司";

      let array = this.options.filter(item => {
        return item.name == val;
      });
      if (array.length > 0) {
        this.expressName = array[0];
      } else {
        this.expressName = {};
      }
      setTimeout(() => {
        this.inputExpressCompanyName = "";
      }, 100);
    },
    stopmove(e) {
      e.preventDefault();
      e.stopPropagation();
    },
    stoppao(e) {
      e.stopPropagation();
    },

    //酒店时间转换
    //时间日期
    getDays(strDateStart, strDateEnd) {
      let start = strDateStart.split(" ");
      let end = strDateEnd.split(" ");
      let strSeparator = "-"; //日期分隔符
      let oDate1, oDate2, iDays;
      oDate1 = start[0].split(strSeparator);
      oDate2 = end[0].split(strSeparator);
      let strDateS = new Date(oDate1[0], oDate1[1] - 1, oDate1[2]);
      let strDateE = new Date(oDate2[0], oDate2[1] - 1, oDate2[2]);
      iDays = parseInt(Math.abs(strDateS - strDateE) / 1000 / 60 / 60 / 24); //把相差的毫秒数转换为天数
      console.log(iDays);
      return iDays;
    },

    //value 11 酒店确认下单
    confirmHotelOrder(api, id) {
      let that = this;
      if (that.noMoreClick) {
        return;
      }
      that.noMoreClick = true;
      $http
        .get(api, { order_id: id }, "处理中...")
        .then(res => {
          that.noMoreClick = false;
          if (res.result == 1) {
            that.$dialog.alert({ message: res.msg });
            this.reload();
          } else {
            that.$dialog.alert({ message: res.msg });
          }
        })
        .catch(error => {
          that.noMoreClick = false;
          console.log(error);
        });
    },

    //value 53 获取盲盒商品
    getBlindBoxGoods(id) {
      $http
        .get(
          "plugin.blind-box.api.index.blind-box-goods",
          {
            order_id: id
          },
          ""
        )
        .then(res => {
          console.log(res);
          if (res.result == 1) {
            this.blindBoxInfo.show = true;
            this.blindBoxInfo.goods = res.data.order;
          }
        });
    },

    // 跳转评价
    evaluateOpration(btn, item, order) {
      //value-0 value-1追加评价 value-2查看评价详情
      if (btn.value == 0) {
        this.$router.push({ name: "evaluate", params: { order_id: order.id, id: item.id }, query: { i: this.toi } });
      } else if (btn.value == 1) {
        this.$router.push({ name: "addevaluate", params: { goods_id: item.goods_id, order_id: order.id, id: item.id }, query: { i: this.toi } });
      } else if (btn.value == 2) {
        //CommentDetails
        this.$router.push({
          name: "CommentDetails",
          params: {
            order_id: order.id,
            goods_id: item.goods_id,
            order_goods_id: item.id,
            comment_id: 0,
            uid: 0
          },
          query: { i: this.toi }
        });
      }
    },

    toOrderDetail(order) {
      if (this.$route.params.member_type == 4 || this.$route.params.member_type == 2) {
        this.$router.push(
          this.fun.getUrl("debtOrderDetail", {
            order_id: order.id,
            orderType: "debt",
            member_type: this.$route.params.member_type
          })
        );
        return;
      }
      if(this.$route.params.orderType == 'local-life'){
        this.$router.push(this.fun.getUrl("local_life_order_details",{order_id:order.id}))
        return;
      }
      let yz_basic_info = JSON.parse(localStorage.getItem("yz_basic_info"));
      if ( yz_basic_info.plugin_setting?.cloud_shop?.open_state == 1 ){
        let order_manage_hidden_status = yz_basic_info.plugin_setting?.cloud_shop.order_manage_hidden_status;
        let order_manage_type_status = yz_basic_info.plugin_setting?.cloud_shop.order_manage_type_status;
        // 云店开启了，并且开启了订单筛选开关，统一跳转云店订单列表
        if(order_manage_hidden_status == 1 || order_manage_type_status == 1){
          this.$router.push(
            this.fun.getUrl(this.detailUrl, {
              order_id: order.id,
              orderType: 'cloud_shop'
            })
          );
          return
        }
      }
      this.$router.push(
        this.fun.getUrl(this.detailUrl == "HotelOrderDetail" ? "HotelOrderDetail" : this.detailUrl, {
          order_id: order.id,
          orderType: this.orderType
        })
      );
    },
    getWarehouseList_CH() {
      $http
        .get("plugin.order-inventory.frontend.index.warehouse-list", {}, ".")
        .then(response => {
          if (response.result == 1) {
            this.inventoryApplyList = response.data.list; //仓库列表
            this.inventoryApplyRadio = response.data.list[0].id;
            this.inventoryApplyPopup = true; //存货申请弹窗
          } else {
            this.$dialog.alert({ message: response.msg });
          }
        })
        .catch(err => {
          console.log(err);
        });
    },
    confirmInventoryApply() {
      $http
        .get("plugin.order-inventory.frontend.index.inventory-apply", { warehouse_id: this.inventoryApplyRadio, order_id: this.orderPayId }, ".")
        .then(response => {
          this.$dialog.alert({ message: response.msg });
          this.$emit("ConfrimOrderNotification", "pay");
        })
        .catch(err => {
          console.log(err);
        });
    },
    // 客服
    getKefu(good) {
      let goods_id;
      if (good.length > 0) {
        goods_id = good[0].goods_id;
      }
      $http.get("goods.customer-service.index", { goods_id: goods_id }, '.').then(response => {
        if (response.result == 1) {
          this.cservice = response.data.cservice;
          this.service_QRcode = response.data.service_QRcode;
          this.service_mobile = response.data.service_mobile;
          this.showKefu = true;
        } else {
          this.$dialog.alert({ message: response.msg });
        }
      });
    },
    toUrl(name, params = {}, query = {}) {
      this.$router.push(this.fun.getUrl(name, params, query));
    },
  },
  computed:{
    cloud_check(key){
      return function(key){
        if(!this.order_manage_hidden_value) return true
        if(this.order_manage_hidden_value.indexOf(key) >= 0){
          return false
        }else{
          return true
        }
      }
    }
  },
  watch: {
    inputExpressCompanyName(newVal) {
      let res = this.columns.filter(val => {
        return val.indexOf(newVal) !== -1;
      });
      this.filterExpressCompanys = res;
    },
    datasource(newVal) {
      this.consolidated = localStorage.getItem("consolidated_payment") == "true" ? true : false;
    }
  },
  inject: ["reload"],
  components: {
    VanSearch: Search,
    yzService,
    issueGoods,
    drawGoods,
    returnTypePop,
    returnGoodsPop
  }
};
</script>
<style lang="scss" rel="stylesheet/scss" scoped>
#orderList {
  .fw-500{
    font-weight: 500;
  }
  .icon-info_store{
    font-size: 1.125rem;
    font-weight: bold;
    margin-right: .375rem;
  }
  .icon-icon_more11{
    font-size: .75rem;
  }
  .fz-30{
    font-size: .9375rem;
  }
  .lease-box{
    color:#F15353;
    font-size: 0.75rem;
    font-weight: 400;
    height: 0.75rem;
    line-height: 0.75rem;
    text-align: left;
    margin-bottom: 0.375rem;
  }
  .order-number {
    height: 0.8125rem;
    font-size: 13px;
    line-height: 0.8125rem;
    font-weight: 400;
    color: #9898A1;
    text-align: left;
    margin-top: 6px;
  }

  .order-shop-name {
    display: flex;
    align-items: center;

    .shop-name {
      font-size: 0.9375rem;
      font-weight: bold;
      color: #00001C;
      max-width: 11.625rem;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
    }
  }

  .blank {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    img {
      width: 6rem;
      height: 6rem;
    }

    span {
      margin-top: 15px;
      color: #ccc;
      font-size: 14px;
    }
  }

  .mint-navbar .mint-tab-item {
    padding: 0.875rem 0;
  }

  .van-dialog {
    width: 80%;
    height: 25rem;
    padding-bottom: 3.125rem;
    padding-top: 3.125rem;

    .van-dialog__content {
      padding-bottom: 1.25rem;

      section {
        height: 16rem;
        padding: 0 0.75rem;
        font-size: 14px;
        overflow-y: scroll;

        .van-button--plain.van-button--primary {
          color: #1989fa;
          width: 100%;
          text-align: right;
          border: none;
        }

        .van-button--normal {
          padding: 0;
        }

        .van-cell {
          padding: 0.875rem 0;
        }

        .van-hairline--top-bottom::after {
          border-width: 0;
        }
      }

      .title {
        line-height: 3.125rem;
        font-weight: bold;
        padding: 0 0.75rem 0 0.75rem;
        position: fixed;
        top: 0;
        width: 100%;
        background: #fff;
        border-bottom: solid 1px #ebebeb;
      }

      .addressee {
        font-size: 15px;
        font-weight: bold;
        min-height: 1.875rem;
        line-height: 1.875rem;
      }

      .user_name {
        width: 100%;
        min-height: 1.5rem;
        line-height: 1.5rem;
        overflow: visible;
        color: #8c8c8c;
      }

      .user_city {
        width: 100%;
        overflow: visible;
        line-height: 1.5rem;
        color: #8c8c8c;
        margin-bottom: 0.625rem;
      }

      .select_company,
      .input_number {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 2.875rem;
        line-height: 2.8125rem;

        .company_right,
        .number_right {
          width: 60%;
          text-align: left;
          height: 2.875rem;
          border-bottom: solid 0.0625rem #ebebeb;

          ::v-deep .van-field__control {
            text-align: center;
          }
        }
      }

      .store_foot {
        width: 100%;
        position: fixed;
        bottom: 0;
        display: flex;

        .van-button {
          width: 50%;
          height: 3.125rem;
          background: #fff;
          font-size: 16px;
        }

        .btn_b {
          color: #1989fa;
          border: solid 0.0625rem #ebebeb;
        }

        .btn_a {
          border-top: solid 0.0625rem #ebebeb;
        }
      }
    }
  }

  .inventory-apply-popup {
    height: auto;
    padding: 0;

    ::v-deep .van-dialog__content {
      padding: 0 0.875rem 0.875rem;
      max-height: 15rem;
      text-align: left;
      overflow-y: scroll;

      .van-radio {
        padding: 0.875rem 0;
      }
    }
  }
}

.olis {
  height: 100vh;
}

.Margintop {
  margin-bottom: 3.75rem;
}
.more-button-1{
    position: relative;
    height: 2rem;
    margin-left: 0.1563rem;
    line-height: 2rem;
    font-size: 0.8125rem;
    color:#9898A1;
    order: -1;
    flex: 1;
    text-align: left;
  }
.shop {
  background: #ffffff;
  padding: 0.9375rem 0.75rem;
  margin: 0.625rem;
  border-radius: 10px;

  a {
    color: #000;
  }

  .title::after {
    content: "";
    display: block;
    clear: both;
  }
  .title-pay{
    font-size: 0.75rem;
    color: #00001C;
    text-align: right;
    margin-top: 0.75rem;
    line-height: 0.9375rem;
  }
  .title {
    display: flex;
    align-items: center;

    .title-detail {
      display: flex;
      align-items: center;
      flex: 1;
    }


    .span {
      color: #f15353;
      text-align: right;
      margin-right: 0.0625rem;
      font-size: 14px;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .tags {
      min-height: 1.125rem;
      line-height: 1.125rem;
      font-size: 12px;
      background-color: #F38D54;
      color: #fff;
      border-radius: 0.25rem;
      padding: 0 0.1875rem;
      word-break: normal;
      //  max-width: 4.3rem;
      text-overflow: -o-ellipsis-lastline;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      margin-right: 8px;
      box-sizing: border-box;
    }
  }

  span.del {
    border-radius: 0.875rem;
    border: 0.0625rem solid #f15353;
    text-align: center;
    padding: 0.25rem 0.625rem;
    font-size: 12px;
  }

  .shop-box {
    display: flex;
    padding: 0.3rem 0.6rem;
    line-height: 28px;

    .shop-box-left {
      display: flex;
      width: 90%;

      p {
        font-size: 16px;
        font-weight: bold;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }

    .icon-fontclass-dianpu {
      font-size: 26px;
      color: #f15353;
    }

    .icon-advertise-next {
      font-size: 26px;
      color: #bdbdbd;
      flex: 0 0 30px;
    }
  }
  .group-banquet{
    background-color: #FBFBFB;
    color: #9898A1;
    font-size: 0.8125rem;
    text-align: left;
    padding-bottom: 0.5938rem;
    padding-left: 0.6563rem;
    margin-top: -0.3125rem;
    p{
      margin-bottom: 0.3125rem;
    }
  }
  .address-box {
    padding:0.5938rem 0.6563rem 0.6875rem;
    text-align: left;
    color: #9898A1;
    margin-top: 0.875rem;
    background-color: #FBFBFB;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    line-height: 0.875rem;
    p:first-child{
      margin-bottom: 0.375rem;
    }
  }
  .time-share-top{
    background: #FBFBFB;
    border-radius: 0.5rem;
    color:#9898A1;
    font-size:0.8125rem;
    font-weight: 400;
    padding: 0.5938rem 0.6563rem;
    margin-bottom:0.5625rem;
    text-align: left;
  }
  .time-share-bottom{
    color:#F15353;
    font-weight: 400;
    margin-left: 0.75rem;
    font-size: 0.8125rem;
    text-align: left;
  }

  .coffee_expire_time {
    text-align: left;
    padding: 0.5625rem 0.6563rem;
    color: #F15353;
    font-size: 0.8125rem;
    font-weight: 400;
  }
  .allbtStockTime{
    color: #9898A1;
    font-weight: 400;
    font-size: 0.8125rem;
    margin-left: 0.6563rem;
    margin-top: 0.5625rem;
    text-align: left;
  }
  .allbtStock {
    position: relative;
    // border-top: 0.0625rem solid #ebebeb;
    display: flex;
    justify-content: flex-end;
    align-items: center;

    .rightAll {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      flex-wrap: wrap;
      position: relative;

      span {
        min-width: 4.75rem;
        padding:0 0.75rem;
        color: #00001C;
        border-radius: 1.875rem;
        height: 1.9375rem;
        line-height: 1.9375rem;
        border: 1px solid #AAAAB3;
        font-size: 0.8125rem;
        box-sizing: border-box;
        margin: 0.5rem 0 0 0.5rem;
        text-align: center;
      }

      .red-button {
        border: 0.0625rem solid #f14e4e;
        background-color: #f14e4e;
        color: #fff;
      }

      .noClickBG {
        border: 1px solid #AAAAB3;
        // background: #e8e8e8;
        color: #00001C;
      }

      .trans {
        position: absolute;
        right: 1.875rem;
        bottom: 2.5rem;
        // width: 0;
        // height: 0;
        // border-width: 0.8rem 0.8rem 0;
        // border-style: solid;
        // border-color: #f5f5f5 transparent transparent;
        width: 1.3125rem;
        height: 1.3125rem;
        background: #FFFFFF;
        box-shadow: 0rem 0.0938rem 0.5rem 0.0313rem #E9E9E9;
        border-radius: 0rem 0rem 0rem 0rem;
        border: 1px solid #E3E3E3;
      }

      .more-button {
        position: absolute;
        width: 5.625rem;
        min-height: 2.25rem;
        background: #FFFFFF;
        box-shadow: 0px 0.0938rem 0.5rem 0.0313rem #E9E9E9;
        border-radius: 0.3125rem;
        opacity: 1;
        border: 1px solid #E3E3E3;
        border-radius: 5px;
        left: 0.7813rem;
        bottom: 3.2rem;

        p {
          font-size: 0.8125rem;
          padding: 0.3rem 0.1rem;
          border-top: 1px solid #e2e2e2;
        }
      }
    }
  }

  .row-reverse{
    flex-direction: row-reverse;
    justify-content:unset !important;
  }
  .allbt {
    position: relative;
    padding-top: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;

    span {
      min-width: 4.8125rem;
      padding: 0 0.7813rem;
      height:2rem;
      line-height: 2rem;
      border-radius: 1.875rem;
      border: 1px solid #AAAAB3;
      margin-left: 0.625rem;
      text-align: center;
      font-size: 0.8125rem;
      box-sizing: border-box;
    }

    .red-button {
      border: 0.0625rem solid #F15353;
      background-color: #F15353;
      color: #fff;
    }

    .red-button_n {
      color: #9898A1;
      border: none;
      min-width: 0;
    }

    .noClickBG {
      border: 0.0625rem solid #e8e8e8;
      // background: #e8e8e8;
      color: #999;
    }

    .trans {
      position: absolute;
      right: 1.875rem;
      bottom: 2.5rem;
      // width: 0;
      // height: 0;
      // border-width: 0.8rem 0.8rem 0;
      // border-style: solid;
      // border-color: #f5f5f5 transparent transparent;

      width: 1.3125rem;
      height: 1.3125rem;
      background: #FFFFFF;
      box-shadow: 0rem 0.0938rem 0.5rem 0.0313rem #E9E9E9;
      border-radius: 0rem 0rem 0rem 0rem;
      border: 1px solid #E3E3E3;
    }

    .more-button {
      position: absolute;
      width: 5.625rem;
      min-height: 2.25rem;
      background: #FFFFFF;
      box-shadow: 0px 0.0938rem 0.5rem 0.0313rem #E9E9E9;
      border-radius: 0.3125rem;
      opacity: 1;
      border: 1px solid #E3E3E3;
      border-radius: 5px;
      left: 0;
      bottom: 2.125rem;

      &:before,
      &:after {
        position: absolute;
        content: '';
        border: 10px solid;
      }

      &::after {
        border-color: #fff transparent transparent transparent;
        left: 4px;
        bottom: -19px;
      }

      &::before {
        left: 4px;
        bottom: -20px;
        border-color: #E3E3E3 transparent transparent transparent;
      }

      p {
        text-align: center;
        height: 2.25rem;
        line-height: 2.25rem;
        font-size: 0.8125rem;
        border-top: 1px solid #e2e2e2;
      }
    }
  }

  .exchange_order_box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0.75rem 0.75rem 0.75rem;
    padding: 0.75rem 0.5rem;
    background: #f2f2f2;
    font-size: 12px;
    border-radius: 8px;

    i {
      color: #f15353;
      font-weight: 600;
    }
  }

  .goods::after {
    content: "";
    display: block;
    clear: both;
  }

  .goods-box {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    margin-top: 0.9375rem;

    .img {
      margin-right: 0.5313rem;
      width: 5.375rem;
      display: inline-block;
      flex-shrink: 0;

      img {
        width: 100%;
        border-radius: 0.625rem;
        display: block;
      }
    }

    .goods-box-bottom {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      min-height: 5.375rem;
    }
    .fz-28{
      font-size: 0.875rem;
    }
    .bold{
      font-weight: bold;
    }
    .text-left{
      text-align: left;
    }
    .option{
      font-size: 0.8125rem;
      font-weight: 400;
      color: #9898A1;
      margin-top:0.4375rem;
      text-align: left;
      div{
      //  min-height: 0.8125rem;
        // line-height: 0.8125rem;
        // text-align: left;
        // overflow: hidden;
        // text-overflow: ellipsis;
        // display: -webkit-box;
        // -webkit-line-clamp: 2;
        // -webkit-box-orient: vertical;
      }
    }
    .reserveClass {
      font-size: 0.75rem;
      color: #f15353;
      margin-top: 0.375rem;
      text-align: left;
      height: 0.75rem;
      line-height: 0.75rem;
      margin-bottom: 0.375rem;
    }

    .warp {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 0.875rem;
      font-weight: 500;
      color: #00001C;
      .name {
        width: 12.1875rem;
        font-size: 0.875rem;
        text-align: left;
        color: #00001C;
        overflow: hidden;
        text-overflow: ellipsis;
        text-wrap: nowrap;
        }
    }
  }

  .comment-box {
      display: flex;
      justify-content: flex-end;
      align-items: center;
      margin-top: 0.25rem;

      .comment-btn {
        color: #00001C;
        border: 0.0625rem solid #9f9c9c;
        margin-left: 0.625rem;
        min-width: 4.8125rem;
        font-size: 0.8125rem;
        padding: 0 0.7813rem;
        height:1.75rem;
        line-height: 1.75rem;
        border-radius: 1.875rem;
        text-align: center;
      }

      .color-btn {
        color: #f15353;
        border-color: #f15353;
      }
    }
    .price {
      font-size: 14px;
      text-align: right;
      color: #333;


      small {
        font-size: 12px;
      }
    }
  .goods {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    .img {
      margin-right: 0.5313rem;
      /* flex: 1; */
      width: 5.375rem;
      display: inline-block;

      /* background:blue; */
      img {
        width: 100%;
        // height: 100%;
      }
    }

    .warp {
      width: 69%;
      padding: 0.625rem 1rem 0.625rem 0;
      display: inline-block;

      .inner {
        float: left;
        box-sizing: border-box;
        text-align: left;

        .name {
          font-size: 14px;
          text-align: left;
          color: #333;
          margin-bottom: 0.625rem;
          height: 2.5rem;
          line-height: 1.25rem;
          overflow: hidden;
          text-overflow: ellipsis;
          text-wrap: nowrap;
        }

        .num {
          font-size: 14px;
          color: #333;
        }
      }
    }





    .option {
      color: #888;
      font-size: 12px;
      flex: 1;
      display: flex;
      line-height: 14px;
    }

    .reserveClass {
      font-size: 13px;
      color: #f15353;
      margin-top: 0.5rem;
    }
  }

  #tbs {
    display: flex;
    align-items: center;
    background: #fff;
    flex-flow: row wrap;
    padding: 0.625rem;
    line-height: 1.5rem;
    border-bottom: 0.0625rem solid #d9d9d9;

    .left {
      text-align: left;
      flex: 50%;
      color: #858585;
    }

    .right {
      text-align: right;
      flex: 50%;
    }

    .add {
      color: #259b24;
    }

    .reduce {
      color: #e51c23;
    }
  }
}

.barter_dialog {
  height: auto !important;
  padding: 0 !important;

  .barter_dialog_1 {
    padding: 0.875rem 0;
    font-size: 1rem;
    font-weight: bold;
    color: #000;
  }

  .barter_dialog_2 {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #ee0a24;
  }
}

.blindBoxInfo {
  .close {
    height: 4rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;

    .icon-adsystem_icon_cancle {
      font-size: 3rem;
      color: #fff;
      width: 3rem;
      height: 3rem;
    }
  }

  .multipleWrapper {
    width: 18.906rem;
    height: 22.25rem;
    background: url(https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/blindToast.png);
    background-size: 100% 100%;

    .desc {
      padding-top: 1.45rem;
      padding-bottom: 0.906rem;
      font-size: 0.938rem;
      color: #fff;
    }

    .goodsWrapper {
      margin: 0 auto;
      padding: 0 0.1rem;
      width: 16.031rem;
      height: 17.6rem;
      border-radius: 0.625rem;
      overflow: scroll;

      .goodsItem {
        width: 100%;
        margin-bottom: 0.6rem;
        background-color: #fff;
        border-radius: 0.313rem;

        .goodInfo {
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 0.531rem 0.469rem;
          font-size: 0.625rem;

          .c1 {
            color: #666;
          }

          .c2 {
            color: #f14e4e;
          }
        }

        .goodContent {
          display: flex;
          padding-bottom: 0.5rem;

          .goods_img {
            height: 3.125rem;
            padding: 0 0.5rem;
            border-radius: 0.125rem;

            img {
              width: 3.125rem;
              height: 3.125rem;
              border-radius: 0.125rem;
            }
          }

          .content {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            height: 3.125rem;
            padding-right: 1.3rem;
            text-align: left;

            .name {
              font-size: 0.75rem;
              color: #333;
              font-weight: bold;
              overflow: hidden;
              text-overflow: ellipsis;
              display: -webkit-box;
              -webkit-line-clamp: 2;
              -webkit-box-orient: vertical;
            }

            .price {
              font-size: 0.625rem;
              color: #666;
            }
          }
        }
      }
    }
  }
}
.deposit-tips-1{
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 5px;
  background-color: RGBA(241, 83, 83, .1);
  color: #f15353;
  margin-right: 5px;
}
.deposit-tips {
  margin-right: 5px;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-items: flex-start;
  span{
    font-size: 11px;
    height: 1.0625rem;
    line-height: 1.0625rem;
    padding: 0 0.3125rem;
    border-radius: 0.25rem;
    background-color: RGBA(241, 83, 83, .1);
    color: #f15353;
  }
}

.refundShow-box {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;

  .popup-title {
    height: 3rem;
    line-height: 3rem;
    font-size: 18px;
    font-weight: bold;
  }

  .popup-context {
    flex: 1;
    overflow: scroll;
    padding: 0 0.875rem 0.875rem;
    text-align: left;
    text-indent: 26px;
  }
}

.custom_receipt_confirmation_html {
  max-height: 20rem;
  padding-top: 0.8rem;
  overflow-y: scroll;

  ::v-deep img {
    max-width: 100%;
    object-fit: cover;
  }
}

::v-deep .pcStyle {
  .van-dialog {
    max-width: 350px;
  }
}
</style>

<style>
.express-select-search.van-search .van-cell {
  align-items: center;
  padding: 0;
}

.express-select-search .van-field__control {
  text-align: center !important;
}

.vipPirce {
  color: #F38D54;
  text-align: left;
  font-weight: 500;
  font-size:12px;
}
.cloud_reward{
  color: #f15353;
  text-align: right;
}
</style>
